﻿<%@ Page Title="" Language="C#" MasterPageFile="Admin.master" %>

<%@ Register Src="../module/Admincenter_Type_Add_Html.ascx" TagName="TypeAddBox"
    TagPrefix="inal" %>
<%@ Register Src="../module/Admincenter-Types-DBColumn-List.ascx" TagName="DBColumnList"
    TagPrefix="inal" %>
<%@ Register Src="../module/Admincenter-Types-Small-Editor.ascx" TagName="SmallEdit"
    TagPrefix="inal" %>
<script runat="server">
    public int Item_Lang = 1;
    public int Typ = 1;
    public int RootId = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        RootId = Convert.ToInt32(Request.QueryString["Rid"]);
        Item_Lang = Utils.GetQueryString("lang", 1);
        Typ = Utils.GetQueryString("typ", 1);
        Types types = new Types();
        Repeater_List.DataSource = types.List(RootId, Typ, Item_Lang);
        Repeater_List.DataBind();
    }

    protected void Unnamed1_Click(object sender, EventArgs e)
    {
        int Item_Lang = 1;
        if (Request.QueryString["lang"] != null)
            Item_Lang = Convert.ToInt32(Request.QueryString["lang"].ToString());
        if (Request.QueryString["Typ"] != null)
            Typ = Convert.ToInt32(Request.QueryString["Typ"].ToString());
        Types types = new Types();
        //types.Typ_Add(TypName.Value.ToString(), Typ, Item_Lang);
        Response.Redirect("Types.aspx?Rid=" + Request.QueryString["Rid"] + "&Typ=" + Request.QueryString["Typ"] + "&lang=" + Item_Lang);
    }
    
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script language="javascript" type="text/javascript">
        /* 维吾尔文输入法 */
        attachAll = true;
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%=Lang.Show("ColumnManagement")%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="Types">
        <asp:Repeater runat="server" ID="Repeater_List">
            <ItemTemplate>
                <div  class="root_div">
                    <div id="TR<%#Eval("Id") %>" class="root column">
                        <code><%#Eval("orders") %></code>
                        <span title="ID:<%#Eval("Id") %>" class="name"><%#Eval("Name") %></span>
                        <a  href="javascript:Del(<%#Eval("Id") %>,5)" class="del"><%=Lang.Show("Del") %></a>
                        <a class="edit" href="javascript:ShowTypeEdit(<%#Eval("Id") %>)"><%=Lang.Show("Edit") %></a>
                        <a class="edit" href="Type-Edit.aspx?id=<%#Eval("Id") %>&lang=<%=Item_Lang %>&typ=<%=Typ %>"><%=Lang.Show("Advanced")%>  - <%=Lang.Show("Edit") %></a>
                        <a href="javascript:Staticize_Obj(<%#Eval("Id") %>,<%=Utils.GetQueryString("typ",1) %>)"><%=Lang.Show("Refresh")%></a>
                        <a class="add" href="Ploting.aspx?id=<%#Eval("Id") %>&obj_typ=5&isreturn=1"><%=Lang.Show("CoverPage")%></a>
                        <a class="add" href="Type-Add.aspx?rid=<%#Eval("Id") %>&lang=<%=Item_Lang %>&typ=<%=Typ %>"><cite>[+]</cite><%=Lang.Show("TypeColumns")%></a>
                        <div class="small_edit" id="SmallEditor_<%#Eval("Id") %>">
                            <inal:SmallEdit runat="server" Type_Id='<%#Utils.ToInt(Container.DataItem,"Id") %>' Type_Orders='<%#Eval("orders") %>' Type_Name='<%#Eval("Name") %>' />
                        </div>
                    </div>
                    <inal:DBColumnList runat="server" Root_Id='<%#Utils.ToInt(Container.DataItem,"Id") %>' Type='<%#Utils.ToInt(Container.DataItem,"Type") %>' Item_Lang='<%#Utils.ToInt(Container.DataItem,"Lang") %>' />
                </div>
                <div class="ch10">
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div class="">
        <inal:TypeAddBox runat="server" />
    </div>
</asp:Content>
